<#macro border>
  <table border=4 cellspacing=0 cellpadding=4>
    <tr>
      <td>
        <#nested/>
      </td>
    </tr>
  </table>
</#macro>
<#macro content>
  <#include "/boya/template/header.html"/>
  <div class="am-cf admin-main">
    <#include "/boya/template/menu.html" />
    <div class="admin-content">
      <#nested/>
    </div>
  </div>
  <a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
  <#include "/boya/template/footer.html"/>
  <#include "/boya/template/script.html"/>
</#macro>
<#macro info>
  <#include "/boya/template/header.html"/>
  <div class="am-cf admin-main">
    <#include "/boya/template/menu.html" />
    <div class="admin-content">
      <#nested/>
    </div>
  </div>
  <a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
  <#include "/boya/template/footer.html"/>
  <#include "/boya/template/script.html"/>
</#macro>
<#macro formInfo action>
  <!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->
  <div class="am-cf admin-main">
    <div class="admin-content">
      <div class="am-cf am-padding">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">${title!''}</strong> /
          <small>${subtitle!''}</small>
        </div>
      </div>
      <div class="am-tabs am-margin">
        <form class="am-form asynForm" method="post" enctype="multipart/form-data" action="${action!''}">
          <#nested/>
          <hr/>
          <button type="submit" class="am-btn am-btn-primary am-btn-xs">保存</button>
        </form>
      </div>
    </div>
  </div>
  <#include "/boya/template/script.html"/>
  <script src="http://lib.h-ui.net/jquery.form/3.51.0/jquery.form.min.js"></script>
  <script type="text/javascript">
  $(function() {
    var options = {
      traditional: true,
      success: function(data) {
        // alert('asd')
        // console.log(data)
        var status = data.status
        if (status == 206) {
          var index = parent.layer.getFrameIndex(window.name);
          parent.layer.close(index);
          parent.window.location.reload();
        }
      }
    };
    $(".asynForm").ajaxForm(options);
  });

  </script>
</#macro>
<#macro pageInfo>
  <!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->
  <div class="am-cf admin-main">
    <div class="admin-content">
      <#nested/>
    </div>
  </div>
  <#include "/boya/template/script.html"/>
</#macro>
